<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="java.util.*"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://www.ranbang.com" prefix="rbtag"%>
<%
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
//response.sendRedirect("common/login");
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>保存</title>
		<script src="${path}/resource/laydate/laydate.js"></script>
		<script type="text/javascript" src="${path }/resource/js/jquery-2.0.3.js"></script>
		<script type="text/javascript" src="${path }/resource/js/mytools.js"></script>
		<script type="text/javascript" src="${path }/resource/layer/layer.js"></script>
		<style type="text/css">
			input[type="text"]{
				margin-left:20px;
				width: 150px;
			}
			.span1{
				display: inline-block;
				width:100px;
				height:25px;
				padding: 3px;
				margin-left:20px;
				text-align: center;
				background:#85876B;
			}
			.button{
				width:80px;
				
			}
		</style>
	</head>
	<body>
		<h4>添加档案</h4>
		<form onsubmit="javascripr:return false;" id="from1" >
			<input type="hidden" value="${obj.id}"  name="id"/>
			<table width="800px">
			<tr align="left">
					<td ><span class="span1">档案编号</span><input type="text" value="${obj.file_no}" name="file_no"/></td>
					<td ><span class="span1">受理编号</span><input type="text" value="${obj.accept_no}" name="accept_no"/></td>
			</tr>
			<tr align="left">
			<td ><span class="span1">宗地号</span><input type="text" value="${obj.land_no}" name="land_no"/></td>
			<td ><span class="span1">宗地面积</span><input type="text"  value="${obj.land_area}" name="land_area"/></td>
			</tr>
			<tr align="left">
			<td ><span class="span1">土地证号</span><input type="text"  value="${obj.soil_no}" name="soil_no"/></td>
			<td ><span class="span1">土地使用者</span><input type="text"  value="${obj.soil_user}" name="soil_user"/></td>
			</tr>
			<tr align="left">
			<td ><span class="span1">原土地证号</span><input type="text" value="${obj.soil_ago_no}" name="soil_ago_no"/></td>
			<td ><span class="span1">原土地使用者</span><input type="text" value="${obj.soil_ago_user}" name="soil_ago_user"/></td>
			</tr>
			<tr align="left">
			<td ><span class="span1">登记类型</span>
			<rbtag:select value="dic_value" tabName="dictionary" filed="dic_value"  inputname="reg_type"></rbtag:select>
			</td>
			<td ><span class="span1">土地用途</span>
			<rbtag:select value="dic_value" tabName="dictionary" filed="dic_value" where="and dic_type='土地用途'" inputname="soil_use"></rbtag:select>
			</td>
			</tr>
			<tr align="left">
			<td ><span class="span1">所属区域</span>
			<rbtag:select value="dic_value" tabName="dictionary" filed="dic_value" where="and dic_type='所属区域'"  inputname="belong_district"></rbtag:select>
			</td>
			<td ><span class="span1">土地等级</span>
			<rbtag:select value="dic_value" tabName="dictionary" filed="dic_value"  where="and dic_type='土地等级'" inputname="soil_level"></rbtag:select>
			</td>
			</tr>
			<tr align="left">
			<td colspan="2"><span class="span1">土地坐落</span><input type="text" style="width: 400px;"  value="${obj.soil_local}" name="soil_local"/></td>
			</tr>
			<tr align="left">
			<td ><span class="span1">图幅号</span><input type="text"  value="${obj.map_no}" name="map_no"/></td>
			<td ><span class="span1">权属性质</span>
			<rbtag:select value="dic_value" tabName="dictionary" filed="dic_value"  inputname="own_property"></rbtag:select>
			</td>
			</tr>
			<tr align="left">
			<td ><span class="span1">发证日期</span><input type="text" value="${obj.cert_time}" onclick="laydate()"  name="cert_time"/></td>
			<td ><span class="span1">发证机关</span><input type="text"  value="${obj.cert_office}" name="cert_office"/></td>
			</tr>
			<tr align="left">
			<td ><span class="span1">使用起期限</span><input type="text" value="${obj.start_deadline}" onclick="laydate()"   name="start_deadline"/></td>
			<td ><span class="span1">使用终期限</span><input type="text" value="${obj.end_deadline}" onclick="laydate()"  name="end_deadline"/></td>
			</tr>
			<tr align="left">
			<td colspan="2"><span class="span1">使用权类型</span>
			<rbtag:select value="dic_value" tabName="dictionary" filed="dic_value"  inputname="power_type"></rbtag:select>
			</td>
			</tr>
			<tr align="center">
			<td colspan="2">
				<input type="button" onclick="save()" value="保存" class="button"/>
				<input type="reset" value="重置" class="button" />
			</td>
			</tr>
				</table>
		</form>
		<script>
		function save(){
			mytooljs.initForm({
				idSelecter :"#from1", //表单id选择器
				sendurl:"${path}/user/fileSoil/addOrModify",//发送请求的地址
				afterload:function(){//请求成功后回调
					alert("保存成功");
					parent.mjs.search();
					parent.layer.closeAll();
				}
			});
			}
		</script>
	</body>
</html>
